# coding: utf-8

from database import db

class IotHistoryData(db.Model):
    __tablename__ = 'iot_history_data'
    Id = db.Column(db.Integer, primary_key=True)
    device_id = db.Column(db.String)
    temperature = db.Column(db.Float)
    humidity = db.Column(db.Float)
    voltage = db.Column(db.Float)
    ### 增加lightness
    collect_time = db.Column(db.DateTime)

class Position(db.Model):
    __tablename__ = 'position'
    Id = db.Column(db.Integer, primary_key=True)
    device_id = db.Column(db.String)
    longitude = db.Column(db.String)
    latitude = db.Column(db.String)
    collect_time = db.Column(db.DateTime)
